package com.zhouwr.system.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统资源
 *
 * @author zhouwr
 * @email 1551541860@qq.com
 * @date 2020-10-08 15:53:25
 */
@Data
@ApiModel(value = "sys_permission对象", description = "系统资源")
@TableName("sys_permission")
public class PermissionEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId
    @ApiModelProperty(value = "主键id")
    private String id;

    /**
     * 父级Id
     */
    @ApiModelProperty(value = "父级Id")
    private String parentBy;
    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String name;
    /**
     * 路由地址
     */
    @ApiModelProperty(value = "路由地址")
    private String path;

    /**
     * 组件路径
     */
    @ApiModelProperty(value = "组件路径")
    private String component;

    /**
     * 权限：sys:user:add，多个用逗号分隔
     */
    @ApiModelProperty(value = "权限：sys:user:add，多个用逗号分隔")
    private String authority = "";
    /**
     * 类型：0-根目录；1-子菜单；2-按钮
     */
    @ApiModelProperty(value = "类型：0-根目录；1-子菜单；2-按钮")
    private Integer type;
    /**
     * 图标
     */
    @ApiModelProperty(value = "图标")
    private String icon;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 显示状态
     */
    @ApiModelProperty(value = "显示状态")
    private Boolean hidden;

    /**
     * 是否缓存
     */
    @ApiModelProperty(value = "是否缓存")
    private Boolean keepAlive;

    /**
     * 是否外联
     */
    @ApiModelProperty(value = "是否外联")
    private Boolean isExternal;

    /**
     * 是否固定在标签栏
     */
    @ApiModelProperty(value = "是否固定在标签栏")
    public Boolean isAffix = false;

    /**
     * 菜单状态
     */
    @ApiModelProperty(value = "菜单状态")
    private Boolean status;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    /**
     * 所属机构
     */
    @ApiModelProperty(value = "所属机构")
    private String orgCode;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

}
